﻿<!--#include file="const.inc"-->
<%
'====================================================================
' 感谢使用晴天3G智能建站系统..
' 作者:梁永强.QQ:766750857
' 官方网址:wap.qt3g.com
' 声明:软件版权归作者所有,没有经过作者本人同意不得非法破解和传播本程序
'====================================================================
%>

<%
	dim nid,tilte,hr,we0,we,sou,dao,zi,zi0,body,dat,dat1
        nid=Request.querystring("nid")
	if nid="" then nid=qingtian.nid 
	if not isnumeric(nid) then nid=qingtian.nid
	nid=clng(nid)
    		Page = Request("page")      '当前页数
    		If Page = "" Then Page = 1
   		If Not IsNumeric(Page) Then Page = 1
    		Page = CLng(Page)
    		If Page < 1 Then Page = 1

if nid=qingtian.nid then
tilte="我的相册"
else
tilte="Ta的相册"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "SELECT id FROM qingtian_user where id="&nid,conn,1,1
if rs.eof then
if v=0 then
%>
<card title="查看TA的相片"><p align="<%=qingtian.px%>">
<%
else
%>
<title>查看TA的相片</title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%
end if
qingtian.err("该会员不存在")
end if
  rs.close
  set rs=Nothing
end if
select case v
case "0"
we0="<br/>"
hr="---------------<br/>"
Randomize()
book="跳到第<input name='Page' format='*N' size='2' maxlength='5'/><anchor>页<go href='index.asp?nid="&nid&"&amp;sid="&sidd&"&amp;run="& Int((9999) * Rnd() + 1) &"' method='post'><postfield name=""Page"" value=""$(Page:n)"" /></go></anchor><br/>"
%>
<card title="<%=tilte%>"><p align="<%=qingtian.px%>">
<%
case "1"
hr=""
zi="<span style=""color:#FF5500"">"
zi0="</span>"
we="<div class=""footer"">"
sou="<div class=""block4"">"
dao="<div class=""navi"">"
we0="</div>"
Randomize()
book=""&dao&"<form nidion=""index.asp?nid="&nid&"&amp;sid="&sidd&"&run="& Int((9999) * Rnd() + 1) &""" method=""post"">跳到第<input type=""text"" name=""Page"" value="""" format=""*N"" size=""2"" maxlength=""5""/><input type=""submit"" value=""页"" /></form>"&we0&""
%>
<title><%=tilte%></title>
</head>
<body>
<!--#include virtual="/css.inc"-->
<%
End Select
%>
<%

		if sid<>"Null" then
		qingtian.info
		end if
response.write qingtian.qingsav("559")
Response.Write(""&dao&"<b><a href=""/user/spacev.asp?nid="&nid&"&amp;sid="&sidd&""">"&qingtian.utf8(qingtian.name(nid))&"的空间</a>&gt;<a href=""photofile.asp?sid="&sidd&""">上传相片</a>&gt;阅读</b>"&we0&""&hr&"")
if nid=qingtian.nid then
body="<a href='photofile.asp?sid="&sidd&"'>【上传相片】</a>"
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from qingtian_upfile where Fid="&nid&" and smallstr=1 order by id desc",conn,1,1
else
body=""
set rs=Server.CreateObject("ADODB.Recordset")
rs.open"select * from qingtian_upfile where Fid="&nid&" and smallstr=1 and photoview=0 order by id desc",conn,1,1
end if
		if not (rs.bof and rs.eof)  then
				Rs.PageSize = 8	'一页N条记录
				IF Not IsEmpty(Page) Then
					IF Not IsNumeric(Page) Then		'判断Page是否为数字
						Page=1
					Else
						Page=Cint(Page)		'转换成短整形Integer
					End IF
					IF Page > Rs.PageCount Then
						Rs.AbsolutePage = Rs.PageCount	'设置当前显示页等于最后一页
					ElseIF Page <= 0 Then
						Rs.AbsolutePage = 1		'设置当前页等于第一页
					Else
						Rs.AbsolutePage = Page	'如果大于零,显示当前页等于接收的页数
					End IF
				Else
					Rs.AbsolutePage = 1
				End IF
				Page = Rs.AbsolutePage


		For i=1 to  Rs.PageSize
		If Rs.Eof Then
			exit For
		End If

dat=i+(page-1)*Rs.PageSize
dat1=dat mod 2
if dat1=0 then
response.write(""&we&"<img src='" & rs("smallfiles") & "' alt='图'/><br/>"&dat&"")
else
response.write(""&sou&"<img src='" & rs("smallfiles") & "' alt='图'/><br/>"&dat&"")
end if
if rs("photoContent")<>"" then
response.write"<a href='photoview.asp?id=" & rs("id") & "&amp;nid="&nid&"&amp;TP=1&amp;sid="&sidd&"'>"&qingtian.utf8(left(rs("photoContent"),15))&"</a>"
else
response.write"<a href='photoview.asp?id=" & rs("id") & "&amp;nid="&nid&"&amp;TP=1&amp;sid="&sidd&"'>"&qingtian.utf8(left(rs("filesname"),15))&"</a>"
end if
response.write"<br/><a href='/user/spacev.asp?nid="&nid&"&amp;sid="&sidd&"'>" & rs("username") & "</a>"
dim photoCount
	photoCount=conn.execute("Select count(ID) from [qingtian_photopl] where photoid="&rs("id")&"")(0)	
response.write"(评"&photoCount&"/阅"&rs("fileCount")&")"
response.write we0 
	 	Rs.MoveNext
	  	Next
           	If rs.PageCount > 1 Then
                   Response.Write dao
   		end if

    		If Page < rs.PageCount Then
    		    Response.Write("<a href='index.asp?nid=" & nid & "&amp;page=" & Page + 1 & "&amp;sid="&sidd&"'>下页</a>")
    		End If
   		If Page > 1 Then
    		    Response.Write("<a href='index.asp?nid=" & nid & "&amp;page=" & Page - 1 & "&amp;sid="&sidd&"'>上页</a>")
    		End If
    		If Page < rs.PageCount Then
    		    Response.Write("<a href='index.asp?nid=" & nid & "&amp;page=" & rs.PageCount & "&amp;sid="&sidd&"'>末页</a>")
    		End If
    		If Page > 1 Then
    		    Response.Write("<a href='index.asp?nid=" & nid & "&amp;page=1&amp;sid="&sidd&"'>首页</a>"&we0&"")
    		Elseif rs.PageCount >1 then
    		    Response.Write we0
    		End If
    
    		If rs.PageCount > 1 Then
    		    %>
		<%=book%>
		<%
     		    Response.Write("" & we & "("&Page&"/"&rs.PageCount&")共"&rs.RecordCount&"张"&we0&"")
    		End If

		else
    		    %>
<%=we%>暂时没有记录，或是只存在私藏照片！<%=we0%>
		<%
		end if
		Rs.close
	set rs=nothing
Response.Write hr
Response.Write("" & we & ""&body&""&we0&"") 
response.write qingtian.qingsav("558")
%>
<%=sou%><a href='p.asp?sid=<%=sidd%>'>返回社区相册</a><%=we0%>

<%
End Function
%>
